<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>彩票管理 - 后台管理中心</title>
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<link rel="stylesheet" type="text/css" href="static/js/layer/css/layui.css"/>
		<link rel="stylesheet" type="text/css" href="static/css/admin.css"/>
		<link rel="stylesheet" type="text/css" href="static/js/fancybox/jquery.fancybox.css">
		<script src="static/js/jquery.min.js"></script>
		<script src="static/js/common.js"></script>
		<script src="static/js/fancybox/jquery.fancybox.pack.js"></script>
	</head>
	
	<body class="login-bg">
	
		<div class="login">
			<div class="message">彩票管理登录</div>
			<div id="darkbannerwrap"></div>
			
			<form action="?" class="layui-form" >
				<input type="hidden" name="m" value="{$m}" />
				<input type="hidden" name="c" value="{$c}" />
				<input type="hidden" name="a" value="{$a}" />
				<input type="text" name="username" id="username" placeholder="帐号" required="true" class="layui-input" >
				<hr class="hr15">
				<input type="password" name="password" id="password" placeholder="密码" required="true" class="layui-input">
				<hr class="hr15">
				<input value="登录" style="width:100%;" type="submit">
				<hr class="hr20" >
			</form>
		</div>
		
		<script src="static/js/layer/layui.all.js"></script>
		<script>
			if (top.location != self.location)
			{
				top.location=self.location;
			}
			$().ready(function(){
                $('#username').focus();
                
                $('form').submit(function(){
                    var username = $('#username');
                    if(username.val().length < 2)
                    {
                        layer.msg('请输入帐号！');
                        username.focus();
                        return false;
                    }
                    
                    var password = $('#password');
                    if(password.val().length < 2)
                    {
                        layer.msg('请输入密码！');
                        password.focus();
                        return false;
                    }
                    
                    $.post('?m={$m}&c={$c}&a={$a}',{'username':username.val(),'password':password.val()},function(res){                        
                        if(res.error > 0)
                        {
                            layer.msg(res.msg);
                        }
                        else
                        {
                            location.href = "{U('index')}";
                        }
                    },'json');
                    
                    return false;
                });
            });
		</script>
	</body>
</html>